﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AspNetCs.Model;
using AspNetCs.Bll;
using System.Data;
using System.Collections;
using AspNetCs.Enumerations;
using AspNetCs.Enumerations.memorial_enum;
using AspNetCs.Enumerations.User_Enum;
using AspNetCs.Common;
using AspNetCs.Enumerations.Channel_Enum;


public partial class Users_ManageLeave : BasePage
{
    protected int types = 0;
    protected int channelID = 0;

    protected string topPhotoPath = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        topPhotoPath = configInfo.InstallDir + "Images/historyphoto.jpg";
        // CheckUserExit("Login.Aspx?ReUrl=" + configInfo.InstallDir + "Users/HistoryPhoto.aspx", "请您登录", true);
        if (!IsPostBack)
        {
            if ((!string.IsNullOrEmpty(Request["types"])) && (!string.IsNullOrEmpty(Request["channelID"])))
            {
                ViewState["types"] = types;
                ViewState["channelID"] = channelID;
            }
            else
            {
                ResultStr("Login.aspx", "参数错误");
            }
            types =StringHelper.isNumber_int(Request["types"]);
            channelID = StringHelper.isNumber_int(Request["channelID"]);
            dataBind();
        }
        else
        {
            if (ViewState["types"] != null && ViewState["channelID"] != null)
            {
                types =StringHelper.isNumber_int(ViewState["types"].ToString());
                channelID = StringHelper.isNumber_int(ViewState["channelID"].ToString());

            }
        }

    }

    protected void dataBind()
    {
        string cmdText = "select * from LeaveInfo where  Types=" + this.types + " and ChannelID=" + this.channelID+ " order by id desc";
        AspNetCs.Common.DataPagesOperate operate = new DataPagesOperate();

        operate.BindRepeater(cmdText, AspNetPager1, "id desc", "id", rptNetMus);


    }

    protected void AspNetPager1_PageChanged(object sender, EventArgs e)
    {
        dataBind();
    }
}
